package com.xn.app.muying.BroadcastReceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.xn.app.muying.fragment.MineFragment;

/**
 * Created by Administrator on 2016/10/26.
 */
public class MyBroadcastReceiver extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {

        if(MineFragment.zhuangtai==null || MineFragment.yiyuan==null){

        }else{
            if(intent.getAction().equals("mode")){
                MineFragment.zhuangtai.setText("怀孕期");
            }else if(intent.getAction().equals("hosptial")){
                MineFragment.yiyuan.setText(intent.getStringExtra("name"));
            }else if(intent.getAction().equals("state")){
                MineFragment.zhuangtai.setText(intent.getStringExtra("info"));
            }else if(intent.getAction().equals("home")){
                MineFragment.zhuangtai.setText("怀孕期");
            }
        }


    }

}
